<link rel="stylesheet" type="text/css" href="Public/Home/css/header.css"/>
<script type="text/javascript" src="Public/Home/js/index.js"></script>
</head>
	<body>
<!--顶部开始-->
		<div id="top">
			<div class="top">
				<div class="top_left">
					<div class="top_left1">
						<span>Hi,</span>
						<?php if(isset($_SESSION['username'])): ?>
							<?php echo $_SESSION['username'] ?>&nbsp;
							<a href="<?php echo U('Login/Logout')?>" style="color: #0066CC;">退出</a>
						<?php else: ?>
						请
						<a class="left1_a" href="<?php echo U('Login/login')?>">登录</a>
						/
						<a class="left1_a" href="<?php echo U('Login/register')?>">注册</a>
						<?php endif ?>
						<em></em>
					</div>
					<div class="top_left2">
						<span>送货至</span>
						<a class="left2_a" href="">北京</a>
					</div>
				</div>
				<div class="top_right">
					<ul class="top_ul">
						<?php if(isset($_SESSION['uid'])){?>
                
							<li class="top_li"><a href="<?php echo U('center/index')?>">我的1号店</a></li>
						<?php }else{?>
							<li class="top_li"><a href="<?php echo U('Login/login')?>">我的1号店</a></li>
						
               <?php }?>
						<li class="top_li"><a href="">收藏夹</a></li>
						<li class="top_li">
							<a href="">
								<i></i>
								掌上一号店
							</a>
						</li>
						<li class="top_li"><a href="">客户服务</a></li>
						<li class="top_li"><a href="">网站导航</a></li>
					</ul>
					<span class="top_span">关注我们：</span>
					<a class="top_a1" href=""></a>
					<a class="top_a2" href=""></a>
				</div>
			</div>
		</div>
		<?php
			$Index = isset($_GET['c']) ? $_GET['c'] : 'Index';
		?>
		<!--顶部结束-->
		<?php if($Index == 'Index'){?>
                
		<!--三个图片开始-->
		<div id="Three_image">
			<a href=""><img src="Public/Home/images/three_one.jpg"/></a>
			<a href=""><img src="Public/Home/images/three_two.jpg"/></a>
			<a href=""><img src="Public/Home/images/three_three.jpg"/></a>
		</div>
		<!--三个图片结束-->
		
               <?php }?>
		<!--搜索部分开始-->
		<div id="ss">
			<div class="ss1">
				<a href=""><img src="Public/Home/images/ss1.png"/></a>
			</div>
			<div class="ss2">
				<div class="ss2_ss2">
					<div class="ss2_left">
						<a href="javascript:;">商品</a>
						<i></i>
					</div>
					<div class="ss2_right">
						<input type="text" name="" id="" value="" placeholder="1号店年货盛典-百万年货 物超所值"/>
						<button>搜 索</button>
					</div>
				</div>
				<p>
					<a href="">iPhone 6s</a>
					<a href="">女士内裤</a>
					<a href="">手机</a>
					<a href="">毛呢外套</a>
					<a href="">三只松鼠</a>
					<a href="">保鲜袋</a>
					<a href="">海飞丝</a>
					<a href="">乳液</a>
					<a href="">海飞丝</a>
					<a href="">七度空间</a>
					<a href="">汰渍</a>
				</p>
			</div>
			<div class="ss3">
				<div class="ss3_left1">
					<a href="">
						<em></em>
						<p>福利</p>
						<i></i>
					</a>
				</div>
				<div class="ss3_left2">
					<a href="">
						<em></em>
						<p>订单查询</p>
						<i></i>
					</a>
				</div>
				<div class="ss3_left3">
					<i></i>
					<?php if(Cart::getTotalNums()){?>
                
					<u><?php echo Cart::getTotalNums()?></u>
					
               <?php }?>
					<a href="<?php echo U('Cart/index')?>">
						<em></em>
						购物车
					</a>
				</div>
			</div>
		</div>
		<!--搜索部分结束-->
		<!--所有商品分类开始-->
		<?php
			//实例化分类表模型
			$model = new \Common\Model\shopCate;
			//截取分类(随机6个)
			$data = $model->where("pid=66")->limit(6)->get();
		?>
		<?php
			//实例化分类表模型
			$model = new \Common\Model\shopCate;
			//获得顶级分类
			$datas = $model->get();
			$topCateData = Data::channelLevel($datas, $pid = 0, $html = "&nbsp;", $fieldPri = 'cid', $fieldPid = 'pid', $level = 1);
		?>
		<!--百分百红色长线-->
		<div class="cx">
			<div id="all">
				<div class="all_top">
					<div class="all_left">
						<a class="all_left_a1" href="">所有商品分类</a>
						<div class="all_bottom" >
							<ul>
								<?php foreach ($topCateData as $k=>$v){?>
								<li>
									<h3>
										<i class="hd_iconfont">&#xe608;</i>
										<a href="<?php echo U('List/index',array('cid'=>$v['cid']))?>"><?php echo $v['cname']?></a>
									</h3>
									<div class="all_bottom_div1">
										<?php foreach ($v['_data'] as $kk=>$vv){?>
										<div class="all_bottom_div1_left">
											<dl>
												<dt><a href="<?php echo U('List/index',array('cid'=>$vv['cid']))?>"><?php echo $vv['cname']?></a></dt>
												<?php foreach ($vv['_data'] as $value){?>
												<dd><a href="<?php echo U('List/index',array('cid'=>$value['cid']))?>"><?php echo $value['cname']?></a></dd>
												<?php }?>
											</dl>
										</div>
										<?php }?>
									</div>
								</li>
								<?php }?>
							</ul>
						</div>
					</div>
					<div class="all_right">
						<ul>
							<li><a style="color: #FF3C3C;" href="<?php echo U('Index/index')?>">首页</a></li>
							<li><a style="color: #FF3C3C;" href="<?php echo U('List/index')?>">自营超市</a></li>
							<li><a style="color: #FF3C3C;" href="<?php echo U('List/index')?>">1号团</a></li>
							<?php foreach ($data as $v){?>
								<li><a href="<?php echo U('List/index',array('cid'=>$v['cid']))?>"><?php echo $v['cname']?></a></li>
							<?php }?>
						</ul>
					</div>
					<div class="all_right1">
						<a href=""><img src="Public/Home/images/all_right1.gif"/></a>
					</div>
					<!--百分百红色长线-->
					<div class="cx"></div>
				</div>
			</div>
		</div>
		<!--所有商品分类结束-->